<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cleartype" content="on">
<meta name="viewport" content="width=device-width, user-scalable=no, minimal-ui">
<link rel="dns-prefetch" href="//jiefangqu.com">
<title>解放区</title>
<style type="text/css">
html { width:100%; height:100%; min-height: 100%; font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100% }
body { position: relative; margin: 0; height:100%; min-height: 100%; width: 100%; background: #fff; color: #232736; font: 12px/180% "Microsoft Yahei", sans-serif; -webkit-tap-highlight-color:rgba(0,0,0,0); }
a { background: transparent }
a:focus { outline: thin dotted }
a:active, a:hover { outline: 0 }
img { border: 0; width:100%; }
img { max-width: 100% }
section {width: 100%; margin: 0 auto; }
.pos-relative { position: relative; }
.t-center { text-align: center; }
.mtop3 { margin-top: -3px; }
.m015{ margin: 0 15px;}
.w20{ width: 20px}
.align-middle{ vertical-align:middle;}

a[href*="cnzz"]{ display: none;}
</style>
</head>
<body class="pos-relative">
<section id="loadingTips" style=" position: fixed; top: 45%; text-align: center; display: none;"><img class="w20 mtop3 align-middle" src=""/></section>
<script>
	function getUrlParam(name) {
		//构造一个含有目标参数的正则表达式对象  
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
		//匹配目标参数  
		var r = window.location.search.substr(1).match(reg);
		//返回参数值  
		if (r != null)
			return unescape(r[2]);
		return null;
	}
	
	(function(){
        var ua = navigator.userAgent.toLowerCase();
        var schemeIOS = getUrlParam('schemeIOS');
        var schemeAdr = getUrlParam('schemeAdr');
        var config = {
            /*scheme:必须*/
            scheme_name: "解放区",
            scheme_IOS: schemeIOS === null ? "jiefangqu://jiefangqu.com?params={'type':'1','controll':'tab1'}" : schemeIOS,
            scheme_Adr: schemeAdr === null ? "jiefangqu://jiefangqu.com/openApp" : schemeAdr,
            download_url_IOS: "https://itunes.apple.com/cn/app/jie-fang-qu/id903769677?mt=8&from='sm'",
            download_url_Adr: "http://app.jiefangqu.com/download/qrCode/androidDown.html",
            timeout: 1200
        };

        function openclient() {
        	
            var startTime = Date.now();
            var ifr = document.createElement('iframe');
            var downLoadUrl = ua.indexOf('os') > 0 ? config.download_url_IOS : config.download_url_Adr;

            ifr.src = ua.indexOf('os') > 0 ? config.scheme_IOS : config.scheme_Adr;
            
            ifr.style.display = 'none';
            
            document.body.appendChild(ifr);

            var timeOutEvent = setTimeout(function() {
                var endTime = Date.now();

                if ((!startTime || endTime - startTime < config.timeout + 200) && confirm('还没有下载' + config.scheme_name + '？先去下载')) {
                    window.location = downLoadUrl;
                    document.getElementById("loadingTips").style.display = "block";
                }
                
            }, config.timeout);

			//如果已经安装该应用，则会在timeout时间内跳转到应用，页面失去焦点，触发清除timeout事件
            window.onblur = function() {
                clearTimeout(timeOutEvent);
            }
            
        }
        
        openclient();

    })()
	
</script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1261123817'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s11.cnzz.com/z_stat.php%3Fid%3D1261123817' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
</html>